/**
 * Copyright (c) 2003-2017 Ben Lau
 * All rights reserved.
 */
package proxy.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

import proxy.statics.DBQuery;
import proxy.statics.IDBQuery;

/**
 * jdk 的动态代理类
 * 
 * @author liubin
 *
 */
public class JdkDBQueryHandler implements InvocationHandler {

	private IDBQuery real = null;

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		if (real == null) {
			real = new DBQuery();
		}
		return real;
	}

}
